package org.itsolutions.javaBackup.gui.web.common.components;

import org.itsolutions.javaBackup.gui.web.common.ApplicationDataHolder;

import com.google.inject.Inject;
import com.vaadin.ui.PasswordField;

/**
 * 
 * @author Tomas Fecko
 */
public class JBPasswordField extends PasswordField {

	private static final long 		serialVersionUID = -6727223573921982382L;
	@Inject ApplicationDataHolder	mAppHolder;

	@Override
	public final String getCaption() {
		String caption = super.getCaption();
		if (caption != null && !caption.isEmpty()) {
			return mAppHolder.getString(caption);
		} else {
			return null;
		}		
	}
}





